<?php defined( '_VALID_MOS' ) or die( include_once("404.php") );?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" type="text/javascript">
	function check(){
	var x = document.forms["poll"]["cbb_id_hv"].value;
		
		if(x==0){
			alert('Xin hãy chọn mã lớp trước khi bình chọn, Cảm ơn!');		
			document.forms["poll"]["cbb_id_hv"].forcus();
			return false;
		}	
	}
</script>
</head>
<?php 
	include_once("protected/dbconnect.php");
	$sql_query="SELECT `id`,`score` FROM `students`";
	$cmd = $mysqli-> prepare($sql_query);
	//$cmd -> execute();
	$cmd -> execute() or die ($mysqli->error);
	$cmd -> store_result();
	$cmd -> bind_result($id,$score);
?>


<div id="box_thamdoykien">
	<div id="sub_box_thamdoykien">
		<div class="bg_tt_right"><div class="bg_tt_left"><div class="bg_tt"><div class="text_tt">TH&#258;M DÒ Ý KI&#7870;N</div></div></div></div>
		<div id="sub_box_thamdoykien1">
			<div class="ct_right"><div class="ct_left"></div>
				<div class="ct">

					<div id="container">	
						<div id="poll-container">
							<div class="text">Ý kiến của bạn về chương trình đạo tạo của chúng tôi ? </div>
<form name="poll" method="get" onsubmit="check();">																			<ul>	
	<div style="float:center;"> 
	<li>  
	<!--get data to components  com_poll-->
		<input type="hidden" name="com" value="com_poll" />  	
		<div align=center><font face="Arial" size="2">
			<select name="cbb_id_hv" >		
			
				<option value="0" selected="selected"> - Chọn mã lớp -</option>
					<?
						while($cmd->fetch()){
							echo "<option value='$id'>$score</option>";						
							}							
					?>
			</select><br/>
			</font></div>																				
	</li>
	</div>
	<li>
		<input type="radio" name="opt" value="1"  checked />
		<label for='opt1'>&nbsp;&nbsp;Rất tốt và hiệu quả </label>
	</li>
	<li>
		<input type="radio" name="opt" value="2" />
		<label for='opt2'>&nbsp;&nbsp;Cũng khá ổn </label>
	</li>
	<li>
		<input type="radio" name="opt" value="3"/>
		<label for='opt3'>&nbsp;&nbsp;Tạm được </label>
	</li>
	<li>
		<input type="radio" name="opt" value="4"/>
		<label for='opt4'>&nbsp;&nbsp;Bình thường </label>
	</li>
	
</ul>
	<div class="content_button">
		<input type="submit" name="btn_vote" value="Bi&#7875;u quy&#7871;t"/>
	</div>
</form>
						</div>
					</div>
					
				</div>
			</div>
			<div class="bt_right"><div class="bt_left"></div></div>
			</div>
	</div>
	<div class="clear"></div>
</div>
